package com.jishuo.nontax.bfc.dao;

import com.jishuo.nontax.bean.vo.CheckDataVO;
import com.jishuo.nontax.bean.vo.DeductVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @auther dinggaofei
 * @Date 2022/12/22 14:59
 */
@Mapper
public interface DeductMapper {

    /**
     * 根据流水号,账户,入账时间统计个数
     * @param deduvto  批扣对象
     * @return
     */
    int findDeductCount(DeductVO deduvto);

    /**
     * 更新批扣
     * @param deduct 批扣对象
     * @return
     */
    int updateDeduct(DeductVO deduct);

    /**
     * 添加批扣
     * @param deduct  批扣对象
     * @return
     */
    int insertDeduct(DeductVO deduct);

    /**
     * 查询批扣收入信息
     * @param accountcode  银行账户
     * @param accountdate  入账时间
     * @return
     */
    List<DeductVO> findSendDeduct(@Param("accountcode") String accountcode, @Param("accountdate") String accountdate);

    /**
     * 根据账户修改收款状态
     * @param accountcode  银行账户id
     * @param accountdate 入账时间
     * @return
     */
    int updateSendDeduct(@Param("accountcode") String accountcode, @Param("accountdate") String accountdate);

   int deleteDeductfiance(@Param("bankaffirm")String bankaffirm,@Param("accountcode")String accountcode,@Param("accountdate")String accountdate);

    int saveDeductfiance(CheckDataVO checkDataVO);

    //页面
    List<DeductVO> findDeductPage(DeductVO deductVO);

    int saveDeduct(DeductVO deductVO);

    DeductVO getDeduct(Long deductid);

    void updateIsBankAffirm(Long deductid);

    /**
     * 根据id集合查询单据信息
     * @param billids
     * @return
     */
    List<DeductVO> findDeduct(List<String> billids);

    int updateSendbankaffirm(DeductVO deductVO);
}
